﻿using System;
using System.Globalization;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows.Media.Imaging;

namespace WpfApplicationExperimental
{
    [ValueConversion (typeof (string ),typeof (bool))]
    public class MainListHeaderToImageConverter:IValueConverter 
    {

        public static MainListHeaderToImageConverter Instance = new MainListHeaderToImageConverter();

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {

            if ((value as string)=="Εγγραφα")
            { 
               /*       
                Uri uri = new Uri("pack://application:,,,/Images/arrow.PNG");
            BitmapImage source = new BitmapImage(uri);
            return source;
                */
                return value;
            }
            else
            {
                //Uri uri = new Uri("pack://application:,,,/Images/folder.png");
                //BitmapImage source = new BitmapImage(uri);
                return value ;
            }
            return value;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotSupportedException("Cannot convert back");
        }
    }
}
